package com.ktjiaoyu.crm.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ktjiaoyu.crm.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

public interface UserService {
    /**
     * 登录
     * @param usrName
     * @param usrPassword
     * @return
     */
    public User login(String usrName,String usrPassword);

    /**
     *
     * @param pageNo
     * @param pageSize
     * @param usrName
     * @param roleId
     * @return
     */
    IPage<User> getUsersByPage(Integer pageNo,Integer pageSize,
                               String usrName,Long roleId);

    /**
     * 新增
     * @param user
     * @return
     */
    public int addUser(User user);

    /**
     * 根据id查询用户
     * @param id
     * @return
     */
    public User getUser(Long id);

    /**
     * 修改
     * @param user
     * @return
     */
    public int updateUser(User user);

    /**
     * 删除
     * @param id
     * @return
     */
    public int deleteUser(Long id);

    /**
     * 根据用户名查询用户信息
     * @param usrName
     * @return
     */
    public User getUserByUsrName(String usrName);
}
